<?
 require_once("./email.php");
 
 if(isset($_POST['CreateEmail']))
 {
 	if($_POST['CreateEmail'] === '1')
	{
		$results = AddEmail($_POST);
		
		header("location:../users/edit.php?id=$_POST[id]");
	}
 }
 
 if(isset($_GET['addressid']))
 {
 	if($_GET['addressid'])
 	{
 		$results = delEmail($_GET['addressid']);
	
		header("location:../users/edit.php?id=$_GET[id]");
 	}
 }
 
 if(isset($_POST['UpdateEmail']))
 {
 	if($_POST['UpdateEmail'] === '1')
	{
		print_r($_POST);
		
		$results = updateEmail($_POST);
		
		print_r($results);
		
		header("location:../users/edit.php?id=$_POST[Customer_id]");
	}
 }
 
 
?>